<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/11/17
 * Time: 21:38
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\admin\controller;

use app\common\business\Wechat as BusObj;
use think\App;

class Wechat extends Base
{
    protected BusObj $busObj;

    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->busObj = new BusObj();
    }
    public function index()
    {
        $id = $this->request->param('id',0,'intval');
        $relname = $this->request->param('relname','','trim');
        $openid = $this->request->param('openid','','trim');
        $where = [];
        if($id != 0){
            $where[] = [
                ['id','=',$id]
            ];
        }
        if(!empty($relname)){
            $where[] = [
                ['relname','like',"%{$relname}%"]
            ];
        }
        if(!empty($openid)){
            $where[] = [
                ['openid','like',"%{$openid}%"]
            ];
        }
        $this->indexWhere = $where;
        return parent::index(); // TODO: Change the autogenerated stub
    }

}